package com.music.music.web;

import com.music.common.core.web.controller.BaseController;
import com.music.common.core.web.page.TableDataInfo;
import com.music.common.redis.service.RedisService;
import com.music.music.domain.Carousel;
import com.music.music.service.ICarouselService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import java.util.List;
import java.util.concurrent.locks.ReentrantLock;

/**
 * 轮播图Controller
 *
 * @author ruoyi
 * @date 2024-10-30
 */
@RestController
@RequestMapping("/carousel/web")
public class CarouselWebController extends BaseController {
    @Autowired
    private ICarouselService carouselService;

    /**
     * 查询轮播图列表
     */
    @GetMapping("/list")
    public TableDataInfo list(Carousel carousel) {
        startPage();
        List<Carousel> list = carouselService.selectCarouselListWeb(carousel);
        return getDataTable(list);
    }
}
